We are IntechOpen, the world's leading publisher of Open Access books Built by scientists, for scientists

Open access books available 5,300

130,000 155M

International authors and editors

Downloads

Our authors are among the

most cited scientists 154 TOP 1%

Selection of our books indexed in the Book Citation Index in Web of Science™ Core Collection (BKCI)

# Interested in publishing with us? Contact book.department@intechopen.com

Numbers displayed above are based on latest data collected. For more information visit www.intechopen.com

## **A Clinical Application of Fuzzy Logic**

Ahmad Esmaili Torshabi <sup>1</sup>, Marco Riboldi 2 , Andera Pella2, Ali Negarestani 1 , Mohamad Rahnema1 and Guido Baroni 2 *<sup>1</sup>Department of Electrical & Computer, Kerman Graduate University of Technology, Kerman, <sup>2</sup>Bioengineering Unit, Centro Nazionale di Adroterapia Oncologica, Pavia, 1 Iran 2 Italy* 

#### **1. Introduction**

In fuzzy logic, linguistic variables are used to represent operating parameters in order to apply a more human-like way of thinking [Zadeh, 1965, 1968, 1973, 1988, 1989]. Fuzzy logic incorporates a simple, *IF-THEN rule-based* approach to solve a problem rather than attempting to model a system mathematically and this property plays a central role in most of fuzzy logic applications [Kang et al., 2000; Lin & Wang, 1999; Shi et al., 1999]. Recently, the main features of fuzzy logic theory make it highly applicable in many systematic designs in order to obtain a better performance when data analysis is too complex or impractical for conventional mathematical models. This chapter represents how fuzzy logic, as explained theoretically in the previous chapters, can practically be applied on a real case. For this aim, a clinical application of fuzzy logic was taken into account for cancer treatment by developing a fuzzy correlation model.

Cancer is an inclusive phrase representing a large number of deseases in which unconrolled cells are divided and grown out of regular form and also are able to invade other healthy tissues. Cancer can usually be treated using surgery, chemotherapy or radiotherapy [Cassileth & Deng, 2004; Smith, 2006; Vickers, 2004]. In radiotherapy method the cancerious cells are bombarded by high energy ionizing radiation such as gamma ray or charge particle beams. The radiation ionizes the bonds of water molecoules located in cell environment and causes releasing of hydroxyl free radicals that have damaging effects for DNA. In external radiotherapy the first and most important step is tumor localization for obtaining maximum targeting accuracy. Tumor volume is visualized using 3D imaging systems [Balter & Kessler 2007; Evans, 2008] such as Computed Tomography (CT) or Magnetic Resonance Imaging (MRI) and then the contoured treatment region depicted by medical physicists is irradiated by means of an external beam extracted from the accelerator systems. In radiotherapy the correct and accurate information of tumor position during the treatment determine the degree of treatment success. Among different tumors, some typical tumors located in lung region of patient body move due to breathing cycle phenomena and this non-regular motion

causes a constraint to achieve the accurate knowledge of tumor location during the treatment [Ramrath et al., 2007; Vedam et al., 2004]. In order to address this issue, one strategy is tracking the tumor motion by continuous monitoring systems such as fluoroscopy which is unsafe for patient due to its additional exposed dose [Dieterich et al., 2008; Keall etal., 2006]. Another alternative that is effective and acceptable, is finding real time tumor position information over time from external rib cage motion [Torshabi et al., 2010]. For this aim, the external breathing motion is synchronized and correlated with internal tumor motion by developing a correlation model in training step before the treatment. It should be mentioned that the external breathing motion is traced by means of specific external markers placed on thorax region (rib cage and abdomen) of patient and recorded by infrared tracking system. In contrast, the internal tumor motion is tracked using implanted internal clips inside or near the tumor volume and visualized using orthogonal X-ray imaging in snapshot mode. A correlation model based on fuzzy logic concept is proposed here to estimate the tumor motion from external markers data as input data when internal marker data is out of access. In order to investigate the clinical application of fuzzy logic, data from real patients were utilized for model testing and verification (Table 1). The end result is a nonlinear mapping from the motion data of external markers as input to an output which is the estimate of tumor motion. When tumor position was predicted by fuzzy model, the gated-respiratory radiotherapy can be applied to treat the tumor [Kubo & Hill 1996, Minohara et al. 2000, Ohara et al., 1989]. In this method the therapeutic beam is only ON in a pre-defined gating window in which tumor volume exists and otherwise, the beam is set to turn OFF for preventing healthy tissues against additional exposure. Therefore based on above description, the specific clinical application of fuzzy model in this chapter consists of all moving targets located in thorax region of patient body such as lung, chestwall and pancreas cancers.

Recently, several respiratory motion prediction models have been developed in different mathematical approaches [Kakar et al., 2005; Murphy et al., 2006; Ramarth et al., 2007; Riaz et al., 2009; Ruan et al., 2008; Vedam et al., 2004]. Since the breathing phenomenon has inherently high uncertainty and therefore causes a significant variability in input/output dataset, fuzzy logic seems to have suitable environment to correlate input data with tumor motion estimation with less error [Kakar et al., 2005; Torshabi et al., 2010].

Our patient database consists of a real database obtained from 130 patients, who received hypo-fractionated stereotactic body radiotherapy with CyberKnife® (Accuray Inc., Sunnyvale, CA) between 2005 and 2007, was analyzed [Brown et al., 2007; Hoogeman et al., 2009; Seppenwoolde et al., 2007]. The patient database is made available by the Georgetown University Medical Center (Washington, DC). Such database includes patients treated with real-time compensation of tumor motion by means of the Synchrony® respiratory tracking module, as available in the Cyberknife® system. This system provides tumor tracking relying on an external/internal correlation model between the motion of external infrared markers and of clips implanted near the tumor. The model is built at the beginning of each irradiation session and updated as needed over the course of treatment. Twenty patients were selected randomly among the population, as shown in table 1. The chosen patients were divided into control and worst groups and the 3D targeting error of each group were analyzed, separately. The worst group consists of tumor motions with large tracking error.


\*W and C denote worst and control cases, respectively

\*\* LLL, RLL and RUL indicate Left Lower Lung, Right Lower Lung and Right Upper Lung, correspondingly

Table 1. Features of the cases selected for this study.

One of the main factors affected on fuzzy model performance is data clustering for membership function generation [Jain et al., 1999]. Two most practical data clustering approaches considered in this chapter are Subtractive and Fuzzy C-Means (FCM) clustering [Bezdek, 1981; Chiu, 1994; Dunn, 1973; Jang et al., 1997].

In this chapter fuzzy model structure and different steps of model performance were explained graphically and finally we compared fuzzy model performance with two different correlation models based on Artificial Neural Network and State model [Procházka & Pavelka, 2007; Robert et al., 2002; Ruan et al., 2008; Seppenwoolde et al., 2007; Sharp et al., 2004; Su et al., 2005]. The state model was implemented as a linear/quadratic correlation between external marker motion and internal tumor motion. In this model The 3D movement of external markers was transformed into a mono-dimensional signal, by projecting the three-dimensional coordinates in the principal component space [Ruan et al., 2008]. Artificial Neural Networks (ANNs) are a mathematical method that simulates the behavior of a natural neural network, where several inputs are integrated to obtain outputs according to predefined rules. The nodes (synapses) are inter-connected with specific weight values, defined during the training phase and representing the significance of each connection. ANNs are widely used to predict signals that may be difficult to model.

The analyzed results of 3D targeting error assessment onto two control and worst groups represent that the implemented fuzzy logic-based correlation model represents the best performance rather than two alternative modelers. In general, fuzzy logic theory appears very useful when the process to be modeled is too complex for conventional techniques, or when the available dataset can be interpreted either qualitatively or with a large degree of uncertainty. Final verifications represent that this model can be potentially applicable for moving tumor located in lung and abdominal region of patient body as some typical cases depicted in table 1.

### **2. Development of fuzzy correlation model**

In fuzzy logic-based systems, membership functions represent the magnitude of participation of each input, graphically. The proposed fuzzy correlation model involves data clustering [Jain et al., 1999] for membership function generation, as inputs for fuzzy inference system section (Figure 1, upper solid rectangle). Data clustering is an approach for finding similar data in a big dataset and puting them into a group. In the other word, data clustering analysis is the organization of a collection of dataset into clusters based on similarity. Therefore, clustering divides a dataset into several groups such that each group consists of a set of data points with same nature. the main purpose of data clustering is breaking a huge dataset into some small groups in order to make a further simplification for data analysis. Clustering algorithms are utilized not only to categorize the data but are also helpful for data compression and model construction. In some cases data clustering can discover a relevance knowledge among datapoints with same nature [Azuaje et al., 2000]. In the implemented fuzzy logic algorithm, data from all three external markers arranged in an input matrix with 9 columns and data from internal marker set in an output matrix with 1 column are clustered initially. Sugeno and Mamdani types of Fuzzy Inference Systems configured by 1) data fuzzification, 2) *if-then* rules induction, 3) application of implication method, 4) output aggregation and 5) defuzzification steps, utilized due to its specific effects on model performance (Figure 1, upper solid rectangles).

Fuzzy correlation model was developed in MatLab (The MathWorks Inc., Natick, MA, USA) using fuzzy logic toolbox. The model is built before the treatment using training data. Training data is 3D external markers motion as model input and internal implanted marker as model output. When the model is developed, it can be applied to estimate tumor motion as a function of time during the treatment (figure 2, solid blocks). The model can also be updated and re-built as needed during the treatment with X-ray imaging representing the internal marker location. Figure 2 shows a block diagram of model operation. The dashed rectangles (right side) in this figure represent the training and updating steps.

Fig. 1. Block diagram of fuzzy inference system (lower part) and data clustering algorithm (upper part)

Fig. 2. Flowchart of correlation model performance

Between several techniques for data clustering, two of most representative techniques utilized in our model are: 1) Subtractive clustering, 2) Fuzzy C-Means clustering. In the training step, two fuzzy inference systems based on above clustering approaches are configured for motion prediction during the treatment. The properties and implementations of these inference systems are in the following paragraphs.

#### **2.1 Membership function generation via subtractive clustering**

The first clustering algorithm employed for data grouping in this work is on the basis of subtractive technique. In this algorithm, each data point of the dataset is assumed as potential cluster center and therefore a *density measure* at data point *ai* is calculated as the following equation:

$$DM\_j = \sum\_{i=1}^{m} \exp\left(-\frac{\left\|a\_i - c\_j\right\|^2}{\left(r/2\right)^2}\right)$$

Where *ai* is the *i* th measured data point, *cj* is the center of the cluster, and *r* is the neighborhood radius or influence range. By this way, when density value of a data point is high, that data point is surrounded by a huge amount of other neighboring data points.

Subtractive clustering algorithm firstly nominates a datapoint as first cluster center such that its density value calculated by above formula is the largest. As the second step, the algorithm removes all data points belonging to the first cluster, configured with a predefined neighboring radius for determining the next data cluster and its center location. In the third and last step, this clustering algorithm continues density measurements on the rest of data points until all the data points are covered by the sufficient clusters. By ending these steps and when all of data were categorized, a set of fuzzy rules and membership functions are resulted.

#### **2.2 Membership function generation via Fuzzy C-Means clustering**

In Fuzzy C-Means clustering algorithm each data point in the dataset belongs to every cluster with a specific membership degree. The magnitude of this membership degree is determined by finding the distance of data point from cluster center. In the other word, each data point that is close to the cluster center has high value of membership degree, otherwise if a data point that lies far away from the cluster center has a low membership degree. It should be noted that in this way, before applying FCM technique our training dataset is clustered into *n* groups using subtractive clustering algorithm, as mentioned previously.

From mathematical point of view, membership functions in FCM clustering algorithm are obtained by minimization of the following objective function. This equation represents the distance from any given data point to a cluster center weighted by its membership degree:

$$\bigcap\_{\substack{\sum\cdots\sum\subseteq\sum\subseteq\sum\cdots\le\sum\cdots=\sum\cdots=1\\\sum\cdots=1}}\bigcup\_{\substack{\sum\cdots\sum\cdots=1\\\sum\cdots\le\sum\cdots=1}}\left|\mathbf{J}\_{\mathbf{m}} = \sum\_{i=1}^{N}\sum\mathbf{\tilde{u}}\_{ij}\mathbf{\tilde{x}}\_{i} - \mathbf{c}\_{j}\right|^{2}$$

where *m* is any real number greater than 1, *uij* is the degree of membership of *xi* in cluster *j*, *xi* is the *i* th measured data point, and *cj* is the center of the cluster. The value of *m* was set to 2 in our objective function [Bedzek & Pal 1998; Yu 2004]. At first, FCM assumes the cluster centers in the mean location of each cluster. Next, the FCM algorithm sets a membership degree for each data point at each cluster, and then iteratively moves the cluster centers *c<sup>j</sup>* and updates the membership degrees *uij*:

$$\mu\_{\boldsymbol{y}} = \frac{1}{\sum\_{k=1}^{c} \left( \frac{|\mathbf{x}\_{i} - \mathbf{c}\_{j}|}{|\mathbf{x}\_{i} - \mathbf{c}\_{k}|} \right)^{2}}$$

$$\mathcal{C}\_{j} = \frac{\sum\_{i=1}^{N} \boldsymbol{\mu}\_{ij}^{m} \cdot \boldsymbol{\mathcal{X}}\_{i}}{\sum\_{i=1}^{N} \boldsymbol{\mu}\_{ij}^{m}}$$

This iteration process will continue till |U(k+1)-U(k)|<ε, where ε is a termination criterion between 0 and 1, U is [uij] matrix and k is the number of iterations.

In should be noted that the structure of fuzzy inference systems is based on Sugeno (or Takagi-Sugeno-Kang) model [Sugeno & Takagi, 1985]. This model is computationally more efficient and thus gives a faster response, where quick decisions should be taken.

For better description, a typical fuzzy inference system on the basis of FCM clustering algorithm was built as example using the data of one chosen patient from table one with Right Lower Lung (RLL) cancer. Figure 3-a shows a set of Gaussian membership functions generated by this fuzzy inference system on input data given by three external markers that move on three X, Y and Z directions (totally 9 inputs) and figure 3-b illustrates the same membership functions using the same algorithm on output data given by implanted internal marker only on X direction. In this inference system three clusters and hence three *if-then* rules connected with AND operator, have been utilized.

Fig. 3. Gaussian Membership functions generated by fuzzy inference system on the basis of FCM clustering algorithm using total 9 inputs dataset (panels a) and one output dataset (panel b)

### **3. Operation of fuzzy correlation model**

When a fuzzy model was built by training dataset, each external marker data is applied as input and the following steps are accomplished by fuzzy model to estimate the tumor motion as output.

*Fuzzification*: This step takes the inputs and determine their participate degrees at each cluster via generated membership functions (similar to membership function visualized in the previous section).

*Applying AND/OR operator*: When the inputs were fuzzified, if the antecedent of a given rule has more than one part, the fuzzy operator is applied to obtain one number that represents the result of antecedent for that rule. In our typical example, three rules were used connected with AND operator. Figure 4 represents the contribution of each input membership function (filled by yellow) and one output membership functions (filled by blue) associated with applied input value.

Fig. 4. Three rules connected with AND operator in antecedent (yellow) and consequent (blue) parts of FIS

*Applying implication*: Implication step in consequent part of FIS uses a single number given by the antecedent part, and the output is a truncated fuzzy set. In the other word, the consequent is reshaped using a function associated with antecedent. The implication step should be applied for each rule. In figure 5, the truncated output fuzzy set was shown by blue color for second rule of our FIS example. As shown in this example, the build-in function of implication step is on the basis of AND (*minimum selection criteria*) operation.

Fig. 5. Truncated output fuzzy set visualized by blue as result of implication step based on AND operation

*Applying aggregation*: This step receives all the truncated output fuzzy set of each rule and cumulate them as one fuzzy set. Figure 6 shows the aggregation step applied of our

example. As shown, the lowest square represents the accumulation of all available truncated fuzzy sets.

Fig. 6. Accumulation of all truncated fuzzy sets in aggregation step

*Defuzzification*: This step acts as final step and the input is aggregated fuzzy set where the output is a single number that returns the center of the cumulated area under the curve. Defuzzification is performed using five built-in methods. In our example the single output was obtained by Centroid Calculation method.

For real-time tumor tracking the correlation models should be executed without a significant delay such that on-time compensation strategy can be applied against tumor motion. Therefore, the execute time of each correlation model that strongly depends on the utilized mathematical procedures, should be taken into account for clinical application. The features of fuzzy model make it very quick in execution, such that the tumor position can be estimated in real-time condition.

As final part of this chapter, in order to visualize the performance of fuzzy model in tumor motion tracking, one patient database was selected for model configuration and operation. The chosen patient has Right Lower Lung (RLL) cancer belonging to control group. The number of training dataset used for model configuration in pre-treatment step for this case is 11. Figure 7 shows the tumor motion tracking of this case (red line) versus Cyberknife modeler (blue line) over 5 minutes of treatment time on X, Y and Z directions. The imaging points indicated by green squares in these figures were taken by stereoscopic X-ray imaging system and represent the exact position of tumor motion at that time. As mentioned in this chapter, these points are used for model performance assessment and also model updating during the treatment. As shown, there are five green square points on each panel that indicates the updating process has been done every one minute for this case.

Fig. 7. Tumor motion tracking over time on X (upper panel), Y (middle panel) and Z (lower panel) directions in fuzzy model versus Cyberknife modeler

As depicted in figure 7, the performance of fuzzy correlation model in tumor tracking is comparable with Cyberknife modeler, although a negligible local noise is observed around the inhalation/exhalation peaks. In some peaks there are also some over estimation with respect to Cyberknife modeler performance that is highly visible in the last peak shown in middle panel of this figure.

Moreover, two alternative correlation models were taken into account based on artificial neural network and State model, as mentioned in Introduction section.

3D targeting error was calculated for control and worst cases applying fuzzy, ANNs and state models, by means of all imaging points in a same condition [Torshabi et al., 2010]. In this calculation imaging points were utilized as reference points in order to investigate the model performance accuracy. For this aim, the distance between predicted point as given output of three correlation models and corresponding imaging point is measured as model accuracy criteria .Where the assumed predicted point was close to the corresponding imaging point, that model acts reasonably. In contrast, when the predicted point is far away from the corresponding imaging point the accuracy of model performance is missing.

As resulted from this comparative assessment, it can be noted that for control cases where the tracking errors are in a normal interval, there is a good agreement between the performance of three modelers versus Cyberknife. In contrast, for worst cases the fuzzy model has the best performance even better than Cyberknife modeler. In this comparison state model acts as worst prediction model. In worst cases an error reduction improvement was resulted from fuzzy model with respect to Cyberknife that is 10.8% at the 95% confidence level. More detailed information concerning the structure and operation of state model and ANNs with respect to fuzzy model was given by Torshabi et al.

### **4. Conclusion**

In this chapter a clinical application of fuzzy logic was taken into account for cancer treatment by developing a fuzzy correlation model. This model act as prediction model and track the moving targets, placed in lung and abdomen regions of patient body. For this aim the internal-external markers data were utilized for fuzzy model generation (pre-treatment), operation & updating (during the treatment). Fuzzy model structure and different steps of model performance were explained graphically for a real case. Finally a comparative investigation was preformed between fuzzy model performance and two different correlation models based on Artificial Neural Network and State model. The analyzed results represents that the fuzzy model performance is the best with less error and negligible executive time among the modelers. In general, fuzzy model features make it robust for modeling some systems that are too complex to be modeled by means of conventional mathematical techniques. The application of the fuzzy logic is also highly recommended whenever the available dataset is not qualitatively perfect or has a large degree of variability. As drawback point, it should be considered that the fuzzy model has some local small noises near the inhalation/exhalation peaks as depicted in figure 7, such that two artificial neural network and state models can track the motion more smoothly with less local ripples.

In current fuzzy model descibed above, a single output that is tumor motion is properly estimated by means of multi-inputs that is three external markers data. This motion

prediction is suitable for treating the tumors by resiratory-gated radiotherapy approach which in the beam is irradiating only in a pre-defined gating window. As future work, the prediction of volumetric information of tumor motion will be invstigated that is needed for tumor treatment by Real-Time Tumor Tracking Radiotherapy. In this alternative method of radiotherapy that is still in reasearch step, 2D information of tumor contour motion at each moment of treatment time is required. Therefore, The prediction model must work as multiinput/multi-output model such that the multi-output is some finite pionts located on tumor contour at each tumor slice. By this way 3D information of tumor motion and also its deformation can be estimated during the breathing cycle. But the main open isuues that must be addressed in this proposal are restriction in extracting minimum required points of tumor contours at different tumor slices as multi-input data for model configuration and also low quality of Orthogonal X-ray images for model updating.

#### **5. Acknowledgment**

The authors acknowledge Sonja Dieterich for providing access to the clinical database. The research leading to these results has received funding from the European Community's Seventh Framework Programme ([FP7/2007-2013] under grant agreement n° 215840-2).

#### **6. References**



**Fuzzy Logic - Emerging Technologies and Applications** Edited by Prof. Elmer Dadios

ISBN 978-953-51-0337-0 Hard cover, 348 pages **Publisher** InTech **Published online** 16, March, 2012 **Published in print edition** March, 2012

The capability of Fuzzy Logic in the development of emerging technologies is introduced in this book. The book consists of sixteen chapters showing various applications in the field of Bioinformatics, Health, Security, Communications, Transportations, Financial Management, Energy and Environment Systems. This book is a major reference source for all those concerned with applied intelligent systems. The intended readers are researchers, engineers, medical practitioners, and graduate students interested in fuzzy logic systems.

#### **How to reference**

In order to correctly reference this scholarly work, feel free to copy and paste the following:

Ahmad Esmaili Torshabi, Marco Riboldi, Andera Pella, Ali Negarestani, Mohamad Rahnema and Guido Baroni (2012). A Clinical Application of Fuzzy Logic, Fuzzy Logic - Emerging Technologies and Applications, Prof. Elmer Dadios (Ed.), ISBN: 978-953-51-0337-0, InTech, Available from:

http://www.intechopen.com/books/fuzzy-logic-emerging-technologies-and-applications/a-clinical-application-offuzzy-logic

#### **InTech Europe**

University Campus STeP Ri Slavka Krautzeka 83/A 51000 Rijeka, Croatia Phone: +385 (51) 770 447 Fax: +385 (51) 686 166 www.intechopen.com

#### **InTech China**

Unit 405, Office Block, Hotel Equatorial Shanghai No.65, Yan An Road (West), Shanghai, 200040, China Phone: +86-21-62489820 Fax: +86-21-62489821

© 2012 The Author(s). Licensee IntechOpen. This is an open access article distributed under the terms of the Creative Commons Attribution 3.0 License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.